<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="grame">
		<g:set var="entityName" value="\${message(code: '${domainClass.propertyName}.label', default: '${className}')}" />
		<title><g:message code="default.create.label" args="[entityName]" /></title>
	</head>
	<body>
    <content tag="navbar">
        <li class="dropdown visible-xs">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Actions<span class="caret"></span></a>
            <ul class="dropdown-menu" role="menu">
                <li><g:link action="index"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
            </ul>
        </li>
    </content>
    <div class="container">
        <div class="row">
            <div class="col-xs-12 col-sm-9">
                <div class="panel-group" id="create-${domainClass.propertyName}" role="main">
                    <h2 class="panel-heading"><g:message code="default.create.label" args="[entityName]" /></h2>
                    <g:if test="\${flash.message}">
                    <div class="alert alert-info" role="status">\${flash.message}</div>
                    </g:if>
                    <g:hasErrors bean="\${${propertyName}}">
                    <ul class="alert alert-danger" role="alert">
                        <g:eachError bean="\${${propertyName}}" var="error">
                        <li <g:if test="\${error in org.springframework.validation.FieldError}">data-field-id="\${error.field}"</g:if>><g:message error="\${error}"/></li>
                        </g:eachError>
                    </ul>
                    </g:hasErrors>
                    <g:form class="form-horizontal" url="[resource:${propertyName}, action:'save']" <%= multiPart ? ' enctype="multipart/form-data"' : '' %>>
                        <fieldset>
                            <g:render template="form"/>
                        </fieldset>
                        <fieldset class="col-xs-offset-2">
                            <div class="form-group">
                                <g:submitButton name="create" class="btn btn-sm btn-default" value="\${message(code: 'default.button.create.label', default: 'Create')}" />
                            </div>
                        </fieldset>
                    </g:form>
                </div>
            </div><!--/.col-xs-12.col-sm-9-->

            <div class="hidden-xs col-sm-3" id="sidebar">
                <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
                    <div class="panel panel-default">
                        <div class="panel-heading" role="tab" id="sidebar_1">
                            <h4 class="panel-title">
                                <a data-toggle="collapse" data-parent="#accordion" href="#collapse_1" aria-expanded="true" aria-controls="collapse_1">
                                    Actions
                                </a>
                            </h4>
                        </div>
                        <div class="panel-collapse collapse in" id="collapse_1" role="tabpanel" aria-labelledby="sidebar_1">
                            <ul class="list-group">
                                <li class="list-group-item"><g:link action="index"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div><!--/.hidden-xs.col-sm-3-->
        </div>
    </div>
	</body>
</html>
